NULL =

public_icons_themes = \
	hicolor	\
	HighContrastLargePrint \
	HighContrastLargePrintInverse \
	LowContrastLargePrint \
	$(NULL)

public_icons = \
	hicolor_apps_16x16_brasero.png \
	hicolor_apps_22x22_brasero.png \
	hicolor_apps_24x24_brasero.png \
	hicolor_apps_32x32_brasero.png \
	hicolor_apps_48x48_brasero.png \
	hicolor_apps_256x256_brasero.png \
	hicolor_apps_scalable_brasero-symbolic.svg \
	$(NULL)

private_icons = \
	hicolor_actions_16x16_insert-pause.png \
	hicolor_actions_16x16_iso-image-burn.png \
	hicolor_actions_16x16_iso-image-new.png \
	hicolor_actions_16x16_media-optical-audio-new.png \
	hicolor_actions_16x16_media-optical-blank.png \
	hicolor_actions_16x16_media-optical-burn.png \
	hicolor_actions_16x16_media-optical-copy.png \
	hicolor_actions_16x16_media-optical-data-new.png \
    hicolor_actions_16x16_media-optical-video-new.png \
	hicolor_actions_16x16_transform-crop-and-resize.png \
	hicolor_actions_22x22_insert-pause.png \
	hicolor_actions_22x22_iso-image-burn.png \
	hicolor_actions_22x22_iso-image-new.png \
	hicolor_actions_22x22_media-optical-audio-new.png \
	hicolor_actions_22x22_media-optical-blank.png \
	hicolor_actions_22x22_media-optical-burn.png \
	hicolor_actions_22x22_media-optical-copy.png \
	hicolor_actions_22x22_media-optical-data-new.png \
    hicolor_actions_22x22_media-optical-video-new.png \
	hicolor_actions_22x22_transform-crop-and-resize.png \
	hicolor_actions_24x24_insert-pause.png \
	hicolor_actions_24x24_iso-image-burn.png \
	hicolor_actions_24x24_iso-image-new.png \
	hicolor_actions_24x24_media-optical-audio-new.png \
	hicolor_actions_24x24_media-optical-blank.png \
	hicolor_actions_24x24_media-optical-burn.png \
	hicolor_actions_24x24_media-optical-copy.png \
	hicolor_actions_24x24_media-optical-data-new.png \
    hicolor_actions_24x24_media-optical-video-new.png \
	hicolor_actions_24x24_transform-crop-and-resize.png \
	hicolor_actions_32x32_insert-pause.png \
	hicolor_actions_32x32_iso-image-burn.png \
	hicolor_actions_32x32_iso-image-new.png \
	hicolor_actions_32x32_media-optical-audio-new.png \
	hicolor_actions_32x32_media-optical-blank.png \
	hicolor_actions_32x32_media-optical-burn.png \
	hicolor_actions_32x32_media-optical-copy.png \
	hicolor_actions_32x32_media-optical-data-new.png \
    hicolor_actions_32x32_media-optical-video-new.png \
	hicolor_actions_32x32_transform-crop-and-resize.png \
    hicolor_actions_48x48_media-optical-video-new.png \
	hicolor_actions_scalable_insert-pause.svg \
	hicolor_actions_scalable_iso-image-burn.svg \
	hicolor_actions_scalable_iso-image-new.svg \
	hicolor_actions_scalable_media-optical-audio-new.svg \
	hicolor_actions_scalable_media-optical-blank.svg \
	hicolor_actions_scalable_media-optical-burn.svg \
	hicolor_actions_scalable_media-optical-copy.svg \
	hicolor_actions_scalable_media-optical-data-new.svg \
	hicolor_actions_scalable_transform-crop-and-resize.svg \
	hicolor_status_16x16_brasero-disc-00.png \
	hicolor_status_16x16_brasero-disc-05.png \
	hicolor_status_16x16_brasero-disc-10.png \
	hicolor_status_16x16_brasero-disc-15.png \
	hicolor_status_16x16_brasero-disc-20.png \
	hicolor_status_16x16_brasero-disc-25.png \
	hicolor_status_16x16_brasero-disc-30.png \
	hicolor_status_16x16_brasero-disc-35.png \
	hicolor_status_16x16_brasero-disc-40.png \
	hicolor_status_16x16_brasero-disc-45.png \
	hicolor_status_16x16_brasero-disc-50.png \
	hicolor_status_16x16_brasero-disc-55.png \
	hicolor_status_16x16_brasero-disc-60.png \
	hicolor_status_16x16_brasero-disc-65.png \
	hicolor_status_16x16_brasero-disc-70.png \
	hicolor_status_16x16_brasero-disc-75.png \
	hicolor_status_16x16_brasero-disc-80.png \
	hicolor_status_16x16_brasero-disc-85.png \
	hicolor_status_16x16_brasero-disc-90.png \
	hicolor_status_16x16_brasero-disc-95.png \
	hicolor_status_16x16_brasero-disc-100.png \
	hicolor_status_22x22_brasero-disc-00.png \
	hicolor_status_22x22_brasero-disc-05.png \
	hicolor_status_22x22_brasero-disc-10.png \
	hicolor_status_22x22_brasero-disc-15.png \
	hicolor_status_22x22_brasero-disc-20.png \
	hicolor_status_22x22_brasero-disc-25.png \
	hicolor_status_22x22_brasero-disc-30.png \
	hicolor_status_22x22_brasero-disc-35.png \
	hicolor_status_22x22_brasero-disc-40.png \
	hicolor_status_22x22_brasero-disc-45.png \
	hicolor_status_22x22_brasero-disc-50.png \
	hicolor_status_22x22_brasero-disc-55.png \
	hicolor_status_22x22_brasero-disc-60.png \
	hicolor_status_22x22_brasero-disc-65.png \
	hicolor_status_22x22_brasero-disc-70.png \
	hicolor_status_22x22_brasero-disc-75.png \
	hicolor_status_22x22_brasero-disc-80.png \
	hicolor_status_22x22_brasero-disc-85.png \
	hicolor_status_22x22_brasero-disc-90.png \
	hicolor_status_22x22_brasero-disc-95.png \
	hicolor_status_22x22_brasero-disc-100.png \
	hicolor_status_24x24_brasero-disc-00.png \
	hicolor_status_24x24_brasero-disc-05.png \
	hicolor_status_24x24_brasero-disc-10.png \
	hicolor_status_24x24_brasero-disc-15.png \
	hicolor_status_24x24_brasero-disc-20.png \
	hicolor_status_24x24_brasero-disc-25.png \
	hicolor_status_24x24_brasero-disc-30.png \
	hicolor_status_24x24_brasero-disc-35.png \
	hicolor_status_24x24_brasero-disc-40.png \
	hicolor_status_24x24_brasero-disc-45.png \
	hicolor_status_24x24_brasero-disc-50.png \
	hicolor_status_24x24_brasero-disc-55.png \
	hicolor_status_24x24_brasero-disc-60.png \
	hicolor_status_24x24_brasero-disc-65.png \
	hicolor_status_24x24_brasero-disc-70.png \
	hicolor_status_24x24_brasero-disc-75.png \
	hicolor_status_24x24_brasero-disc-80.png \
	hicolor_status_24x24_brasero-disc-85.png \
	hicolor_status_24x24_brasero-disc-90.png \
	hicolor_status_24x24_brasero-disc-95.png \
	hicolor_status_24x24_brasero-disc-100.png \
	hicolor_status_32x32_brasero-disc-00.png \
	hicolor_status_32x32_brasero-disc-05.png \
	hicolor_status_32x32_brasero-disc-10.png \
	hicolor_status_32x32_brasero-disc-15.png \
	hicolor_status_32x32_brasero-disc-20.png \
	hicolor_status_32x32_brasero-disc-25.png \
	hicolor_status_32x32_brasero-disc-30.png \
	hicolor_status_32x32_brasero-disc-35.png \
	hicolor_status_32x32_brasero-disc-40.png \
	hicolor_status_32x32_brasero-disc-45.png \
	hicolor_status_32x32_brasero-disc-50.png \
	hicolor_status_32x32_brasero-disc-55.png \
	hicolor_status_32x32_brasero-disc-60.png \
	hicolor_status_32x32_brasero-disc-65.png \
	hicolor_status_32x32_brasero-disc-70.png \
	hicolor_status_32x32_brasero-disc-75.png \
	hicolor_status_32x32_brasero-disc-80.png \
	hicolor_status_32x32_brasero-disc-85.png \
	hicolor_status_32x32_brasero-disc-90.png \
	hicolor_status_32x32_brasero-disc-95.png \
	hicolor_status_32x32_brasero-disc-100.png \
	hicolor_status_scalable_brasero-disc-00.svg \
	hicolor_status_scalable_brasero-disc-05.svg \
	hicolor_status_scalable_brasero-disc-10.svg \
	hicolor_status_scalable_brasero-disc-15.svg \
	hicolor_status_scalable_brasero-disc-20.svg \
	hicolor_status_scalable_brasero-disc-25.svg \
	hicolor_status_scalable_brasero-disc-30.svg \
	hicolor_status_scalable_brasero-disc-35.svg \
	hicolor_status_scalable_brasero-disc-40.svg \
	hicolor_status_scalable_brasero-disc-45.svg \
	hicolor_status_scalable_brasero-disc-50.svg \
	hicolor_status_scalable_brasero-disc-55.svg \
	hicolor_status_scalable_brasero-disc-60.svg \
	hicolor_status_scalable_brasero-disc-65.svg \
	hicolor_status_scalable_brasero-disc-70.svg \
	hicolor_status_scalable_brasero-disc-75.svg \
	hicolor_status_scalable_brasero-disc-80.svg \
	hicolor_status_scalable_brasero-disc-85.svg \
	hicolor_status_scalable_brasero-disc-90.svg \
	hicolor_status_scalable_brasero-disc-95.svg \
	hicolor_status_scalable_brasero-disc-100.svg \
	$(NULL)

noinst_DATA = \
	hicolor_actions_16x16_insert-pause.svg \
	hicolor_actions_16x16_iso-image-burn.svg \
	hicolor_actions_16x16_iso-image-new.svg \
	hicolor_actions_16x16_media-optical-audio-new.svg \
	hicolor_actions_16x16_media-optical-blank.svg \
	hicolor_actions_16x16_media-optical-burn.svg \
	hicolor_actions_16x16_media-optical-copy.svg \
	hicolor_actions_16x16_media-optical-data-new.svg \
	hicolor_actions_16x16_transform-crop-and-resize.xcf.bz2 \
	hicolor_actions_22x22_insert-pause.svg \
	hicolor_actions_22x22_iso-image-burn.svg \
	hicolor_actions_22x22_iso-image-new.svg \
	hicolor_actions_22x22_media-optical-audio-new.svg \
	hicolor_actions_22x22_media-optical-blank.svg \
	hicolor_actions_22x22_media-optical-burn.svg \
	hicolor_actions_22x22_media-optical-copy.svg \
	hicolor_actions_22x22_media-optical-data-new.svg \
	hicolor_actions_22x22_transform-crop-and-resize.xcf.bz2 \
	hicolor_actions_32x32_insert-pause.svg \
	hicolor_actions_32x32_iso-image-burn.svg \
	hicolor_actions_32x32_iso-image-new.svg \
	hicolor_actions_32x32_media-optical-audio-new.svg \
	hicolor_actions_32x32_media-optical-blank.svg \
	hicolor_actions_32x32_media-optical-burn.svg \
	hicolor_actions_32x32_media-optical-copy.svg \
	hicolor_actions_32x32_media-optical-data-new.svg \
	hicolor_actions_32x32_transform-crop-and-resize.svg \
	hicolor_apps_src_brasero.svg \
	hicolor_status_16x16_brasero-disc-00.svg \
	hicolor_status_16x16_brasero-disc-05.svg \
	hicolor_status_16x16_brasero-disc-10.svg \
	hicolor_status_16x16_brasero-disc-15.svg \
	hicolor_status_16x16_brasero-disc-20.svg \
	hicolor_status_16x16_brasero-disc-25.svg \
	hicolor_status_16x16_brasero-disc-30.svg \
	hicolor_status_16x16_brasero-disc-35.svg \
	hicolor_status_16x16_brasero-disc-40.svg \
	hicolor_status_16x16_brasero-disc-45.svg \
	hicolor_status_16x16_brasero-disc-50.svg \
	hicolor_status_16x16_brasero-disc-55.svg \
	hicolor_status_16x16_brasero-disc-60.svg \
	hicolor_status_16x16_brasero-disc-65.svg \
	hicolor_status_16x16_brasero-disc-70.svg \
	hicolor_status_16x16_brasero-disc-75.svg \
	hicolor_status_16x16_brasero-disc-80.svg \
	hicolor_status_16x16_brasero-disc-85.svg \
	hicolor_status_16x16_brasero-disc-90.svg \
	hicolor_status_16x16_brasero-disc-95.svg \
	hicolor_status_16x16_brasero-disc-100.svg \
	hicolor_status_22x22_brasero-disc-00.svg \
	hicolor_status_22x22_brasero-disc-05.svg \
	hicolor_status_22x22_brasero-disc-10.svg \
	hicolor_status_22x22_brasero-disc-15.svg \
	hicolor_status_22x22_brasero-disc-20.svg \
	hicolor_status_22x22_brasero-disc-25.svg \
	hicolor_status_22x22_brasero-disc-30.svg \
	hicolor_status_22x22_brasero-disc-35.svg \
	hicolor_status_22x22_brasero-disc-40.svg \
	hicolor_status_22x22_brasero-disc-45.svg \
	hicolor_status_22x22_brasero-disc-50.svg \
	hicolor_status_22x22_brasero-disc-55.svg \
	hicolor_status_22x22_brasero-disc-60.svg \
	hicolor_status_22x22_brasero-disc-65.svg \
	hicolor_status_22x22_brasero-disc-70.svg \
	hicolor_status_22x22_brasero-disc-75.svg \
	hicolor_status_22x22_brasero-disc-80.svg \
	hicolor_status_22x22_brasero-disc-85.svg \
	hicolor_status_22x22_brasero-disc-90.svg \
	hicolor_status_22x22_brasero-disc-95.svg \
	hicolor_status_22x22_brasero-disc-100.svg \
	hicolor_status_32x32_brasero-disc-00.svg \
	hicolor_status_32x32_brasero-disc-05.svg \
	hicolor_status_32x32_brasero-disc-10.svg \
	hicolor_status_32x32_brasero-disc-15.svg \
	hicolor_status_32x32_brasero-disc-20.svg \
	hicolor_status_32x32_brasero-disc-25.svg \
	hicolor_status_32x32_brasero-disc-30.svg \
	hicolor_status_32x32_brasero-disc-35.svg \
	hicolor_status_32x32_brasero-disc-40.svg \
	hicolor_status_32x32_brasero-disc-45.svg \
	hicolor_status_32x32_brasero-disc-50.svg \
	hicolor_status_32x32_brasero-disc-55.svg \
	hicolor_status_32x32_brasero-disc-60.svg \
	hicolor_status_32x32_brasero-disc-65.svg \
	hicolor_status_32x32_brasero-disc-70.svg \
	hicolor_status_32x32_brasero-disc-75.svg \
	hicolor_status_32x32_brasero-disc-80.svg \
	hicolor_status_32x32_brasero-disc-85.svg \
	hicolor_status_32x32_brasero-disc-90.svg \
	hicolor_status_32x32_brasero-disc-95.svg \
	hicolor_status_32x32_brasero-disc-100.svg \
	$(NULL)

EXTRA_DIST = \
	$(public_icons)		\
	$(private_icons)	\
	$(noinst_DATA)		\
	$(NULL)

###############################################################################

gtk_update_icon_cache = gtk-update-icon-cache -f -t

update-icon-cache:
	@-if test -z "$(DESTDIR)"; then \
		echo "Updating Gtk icon cache."; \
		for theme in $(public_icons_themes); do \
			$(gtk_update_icon_cache) $(datadir)/icons/$$theme; \
		done; \
	else \
		echo "*** Icon cache not updated.  After (un)install, run this:"; \
		for theme in $(public_icons_themes); do \
			echo "***   $(gtk_update_icon_cache) $(datadir)/icons/$$theme"; \
		done; \
	fi

install-icons:
	for icon in $(public_icons); do \
		THEME=`echo $$icon | cut -d_ -f1`; \
		CONTEXT=`echo $$icon | cut -d_ -f2`; \
		SIZE=`echo $$icon | cut -d_ -f3`; \
		ICONFILE=`echo $$icon | cut -d_ -f4`; \
		mkdir -p $(DESTDIR)$(datadir)/icons/$$THEME/$$SIZE/$$CONTEXT; \
		$(INSTALL_DATA) $(srcdir)/$$icon $(DESTDIR)$(datadir)/icons/$$THEME/$$SIZE/$$CONTEXT/$$ICONFILE; \
	done; \
	for icon in $(private_icons); do \
		THEME=`echo $$icon | cut -d_ -f1`; \
		CONTEXT=`echo $$icon | cut -d_ -f2`; \
		SIZE=`echo $$icon | cut -d_ -f3`; \
		ICONFILE=`echo $$icon | cut -d_ -f4`; \
		mkdir -p $(DESTDIR)$(pkgdatadir)/icons/$$THEME/$$SIZE/$$CONTEXT; \
		$(INSTALL_DATA) $(srcdir)/$$icon $(DESTDIR)$(pkgdatadir)/icons/$$THEME/$$SIZE/$$CONTEXT/$$ICONFILE; \
	done

uninstall-icons:
	-for icon in $(public_icons); do \
		THEME=`echo $$icon | cut -d_ -f1`; \
		CONTEXT=`echo $$icon | cut -d_ -f2`; \
		SIZE=`echo $$icon | cut -d_ -f3`; \
		ICONFILE=`echo $$icon | cut -d_ -f4`; \
		rm -f $(DESTDIR)$(datadir)/icons/$$THEME/$$SIZE/$$CONTEXT/$$ICONFILE; \
	done; \
	for icon in $(private_icons); do \
		THEME=`echo $$icon | cut -d_ -f1`; \
		CONTEXT=`echo $$icon | cut -d_ -f2`; \
		SIZE=`echo $$icon | cut -d_ -f3`; \
		ICONFILE=`echo $$icon | cut -d_ -f4`; \
		rm -f $(DESTDIR)$(pkgdatadir)/icons/$$THEME/$$SIZE/$$CONTEXT/$$ICONFILE; \
	done

install-data-local: install-icons update-icon-cache

uninstall-local: uninstall-icons update-icon-cache

-include $(top_srcdir)/git.mk
